import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Main from '../pages/main'
import MainList from '../pages/mainList.vue'

import Coupon from '../pages/subpages/mainList/coupon'
import Collect from '../pages/subpages/mainList/collect'
import See from '../pages/subpages/mainList/see'
import Order from '../pages/subpages/mainList/order'

import Aid from '../pages/subpages/mainList/aid'
import Chat from '../pages/subpages/mainList/chat'
import Evaluate from '../pages/subpages/mainList/evaluate'
import Complain from '../pages/subpages/mainList/complain'

import Contract from '../pages/subpages/mainList/contract'
import Sublet from '../pages/subpages/mainList/sublet'
import Surrender from '../pages/subpages/mainList/surrender'
import Credit from '../pages/subpages/mainList/credit'
import Relet from '../pages/subpages/mainList/relet'
import Bill from '../pages/subpages/mainList/bill'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/main',
      name: 'Main',
      component: Main
    },
    {
      path: '/mainList',
      name: 'MainList',
      component:MainList,
      children:[
        {
          path: 'coupon',
          component: Coupon
        },
        {
          path: 'collect',
          component: Collect
        },
        {
          path: 'see',
          component: See
        },
        {
          path: 'order',
          component: Order
        },
        {
          path: 'aid',
          component: Aid
        },
        {
          path: 'chat',
          component: Chat
        },
        {
          path: 'evaluate',
          component: Evaluate
        },
        {
          path: 'complain',
          component: Complain
        },
        {
          path: 'contract',
          component: Contract
        },
        {
          path: 'sublet ',
          component: Sublet 
        },
        {
          path: 'surrender',
          component: Surrender
        },
        {
          path: 'credit',
          component: Credit
        },
        {
          path: 'relet',
          component: Relet
        },
        {
          path: 'bill',
          component: Bill
        }
      ]
    }
  ]
})
